package com.sg.service.biz.app.nb;

import cn.hutool.core.bean.BeanUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.dto.biz.app.common.DivContFieldTurnDataSetDto;
import com.sg.dto.biz.app.req.*;
import com.sg.dto.biz.app.res.*;
import com.sg.dto.integration.component.QuerySemanticEngineDetailReqDto;
import com.sg.dto.integration.component.QuerySemanticEngineDetailRespDto;
import com.wicket.okrapp.common.baseinfo.BaseInfoDO;
import com.wicket.okrapp.common.baseinfo.BaseInfoHolder;
import com.wicket.okrcomponent.integration.TemplateEngineService;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;

/**
 * @author ： 手工接入方法
 * @version 1.0
 * @since 2022/5/28 15:32
 */
@Service
public class NbIndexSystem {

    @Resource
    private TemplateEngineService fwCompTemplateEngineClient;

    /**
     * code:publicFieldCache
     * name:M3更新公共字段缓存
     * desc:undefined
     * gen by moon at 8/29/2022, 12:46:09 PM
     **/
    @Trace(operationName = "M3更新公共字段缓存")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public RefreshPublicFieldCacheRespDto refreshPublicFieldCache(RefreshPublicFieldCacheReqDto reqDto) {
        if (BaseInfoHolder.contextHolder.get() != null) {
            BaseInfoHolder.contextHolder.remove();
        }
        BaseInfoDO domain = new BaseInfoDO();
        domain.setSpecSpaceId(reqDto.getSpaceId());
        domain.setSpecInductionRecordId(reqDto.getCreateInductionId());
        domain.setSpecAppId(reqDto.getAppId());
        CommonFunctionHelper.setBaseInfoToLocal(domain);
        return new RefreshPublicFieldCacheRespDto();
    }

    /**
     * code:receptionService
     * name:M3-获取高层负责人接收字段主体类型编码及主体变更日志类型
     * desc:undefined
     * gen by moon at 8/29/2022, 12:46:22 PM
     **/
    @Trace(operationName = "M3-获取高层负责人接收字段主体类型编码及主体变更日志类型")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ObtainReceiveFieldRespDto obtainReceiveField(ObtainReceiveFieldReqDto reqDto) {
        ObtainReceiveFieldRespDto retData = BeanUtil.toBean(reqDto, ObtainReceiveFieldRespDto.class);
        return retData;
    }

    /**
     * code:collectionRemoveDuplicateData
     * name:M3去重虚拟成员部门(特殊方法)
     * desc:undefined
     * gen by moon at 9/10/2022, 3:11:24 PM
     **/
    @Trace(operationName = "M3去重虚拟成员部门(特殊方法)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public UnrepeatedVirtualOrgMemberDeptRespDto unrepeatedVirtualOrgMemberDept(UnrepeatedVirtualOrgMemberDeptReqDto reqDto) {
        UnrepeatedVirtualOrgMemberDeptRespDto retData = new UnrepeatedVirtualOrgMemberDeptRespDto();
        Map<String, VirtualOrgMemberDeptDto> indexInfo = new HashMap<>();
        for (VirtualOrgMemberDeptDto oneDept : reqDto.getVirtualOrgMemberDeptList()) {
            indexInfo.put(oneDept.getDeptId(), oneDept);
        }
        retData.setVirtualOrgMemberDeptList(indexInfo.values().stream().map(p -> BeanUtil.toBean(p, VirtualOrgMemberDeptDto.class)).collect(Collectors.toList()));
        return retData;
    }

    /**
     * code:publicFieldCache
     * name:M3执行业务应用公共字段推送内存（特殊方法）
     * desc:undefined
     * gen by moon at 9/19/2022, 2:56:15 PM
     **/
    @Trace(operationName = "M3执行业务应用公共字段推送内存（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementBizPublicFieldPushMemoryRespDto implementBizPublicFieldPushMemory(ImplementBizPublicFieldPushMemoryReqDto reqDto) {
        BaseInfoDO domain = new BaseInfoDO();
        if (BaseInfoHolder.contextHolder.get() != null) {
            BeanUtil.copyProperties(BaseInfoHolder.contextHolder.get().getBaseInfo(), domain);
            BaseInfoHolder.contextHolder.remove();
        }
        if (reqDto.getSpaceId() != null) {
            domain.setSpecSpaceId(reqDto.getSpaceId());
        }

        if (reqDto.getCreateInductionId() != null) {
            domain.setSpecInductionRecordId(reqDto.getCreateInductionId());
        }

        if (reqDto.getAppId() != null) {
            domain.setSpecAppId(reqDto.getAppId());
        }

        if (reqDto.getHighestOrgID() != null) {
            domain.setSpecHighestOrgID(reqDto.getHighestOrgID());
        }

        if (reqDto.getUserId() != null) {
            domain.setSpecUserId(reqDto.getUserId());
        }

        if (reqDto.getOriginalRoleMemberId() != null) {
            domain.setSpecOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());
        }

        CommonFunctionHelper.setBaseInfoToLocal(domain);
        return new ImplementBizPublicFieldPushMemoryRespDto();
    }

    /**
     * code:objectToData
     * name:M3分工内容字段转数据集（特殊方法）
     * desc:undefined
     * gen by moon at 9/19/2022, 6:51:10 PM
     **/
    @Trace(operationName = "M3分工内容字段转数据集（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public UpdateDivContFieldTurnDataSetRespDto updateDivContFieldTurnDataSet(UpdateDivContFieldTurnDataSetReqDto reqDto) {
        UpdateDivContFieldTurnDataSetRespDto retData = new UpdateDivContFieldTurnDataSetRespDto();
        DivContFieldTurnDataSetDto one = new DivContFieldTurnDataSetDto();
        one.setDivisionContType(reqDto.getDivisionContType());
        one.setDivisionContName(reqDto.getDivisionContName());
        one.setDivisionContId(reqDto.getDivisionContId());
        retData.getDivContFieldTurnDataSetList().add(one);
        return retData;
    }

    /**
     * code:dataSetFieldTurnDataSet
     * name:M3分工内容字段数据集转数据集(特殊方法）
     * desc:undefined
     * gen by moon at 9/19/2022, 6:51:16 PM
     **/
    @Trace(operationName = "M3分工内容字段数据集转数据集(特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public UpdateDivContFieldDataTurnDataSetRespDto updateDivContFieldDataTurnDataSet(UpdateDivContFieldDataTurnDataSetReqDto reqDto) {
        UpdateDivContFieldDataTurnDataSetRespDto retData = new UpdateDivContFieldDataTurnDataSetRespDto();
        retData.setDivContFieldTurnDataSetList(reqDto.getDivContFieldTurnDataSetList());
        return retData;
    }

    /**
     * code:collectionsAggregation
     * name:M3分工内容字段数据集聚合（特殊方法）
     * desc:undefined
     * gen by moon at 9/19/2022, 6:51:30 PM
     **/
    @Trace(operationName = "M3分工内容字段数据集聚合（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public UpdateDivContFieldDataAggregationRespDto updateDivContFieldDataAggregation(UpdateDivContFieldDataAggregationReqDto reqDto) {
        UpdateDivContFieldDataAggregationRespDto retData = new UpdateDivContFieldDataAggregationRespDto();
        if (reqDto.getDivContFieldTurnDataSetList() != null && reqDto.getDivContFieldTurnDataSetList().size() > 0) {
            retData.getDivContFieldTurnDataSetList().addAll(reqDto.getDivContFieldTurnDataSetList());
        }

        if (reqDto.getDivContFieldList() != null && reqDto.getDivContFieldList().size() > 0) {
            retData.getDivContFieldTurnDataSetList().addAll(reqDto.getDivContFieldList().stream().map(p -> BeanUtil.toBean(p, DivContFieldTurnDataSetDto.class)).collect(Collectors.toList()));
        }

        if (reqDto.getDivContFieldDataList() != null && reqDto.getDivContFieldDataList().size() > 0) {
            retData.getDivContFieldTurnDataSetList().addAll(reqDto.getDivContFieldDataList().stream().map(p -> BeanUtil.toBean(p, DivContFieldTurnDataSetDto.class)).collect(Collectors.toList()));
        }


        return retData;
    }

    /**
     * code:oneManyFieldSplice
     * name:M3修改一对多字段拼接
     * desc:undefined
     * gen by moon at 9/19/2022, 6:52:06 PM
     **/
    @Trace(operationName = "M3修改一对多字段拼接")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public UpdateOneManyFieldSpliceRespDto updateOneManyFieldSplice(UpdateOneManyFieldSpliceReqDto reqDto) {
        UpdateOneManyFieldSpliceRespDto retData = new UpdateOneManyFieldSpliceRespDto();
        for (TypeEncodingDto one : reqDto.getTypeEncodingList()) {
            DivHierarchyCodeDto elm = new DivHierarchyCodeDto();
            BeanUtil.copyProperties(one, elm);
            elm.setCodeName(reqDto.getDivisionContName() + elm.getCodeName());
            retData.getDivHierarchyCodeList().add(elm);
        }
        return retData;
    }

    /**
     * code:getCollectionsDiff
     * name:M3查询数据集差集列表(特殊方法）
     * desc:undefined
     * gen by moon at 9/19/2022, 6:52:44 PM
     **/
    @Trace(operationName = "M3查询数据集差集列表(特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public QueryCollectionsDiffListRespDto queryCollectionsDiffList(QueryCollectionsDiffListReqDto reqDto) {
        QueryCollectionsDiffListRespDto retData = new QueryCollectionsDiffListRespDto();
        List<String> filteredList = new ArrayList<>(reqDto.getTargetObjList());
        Map<String, ObjectivePlanningExtendDto> indexInfo = new HashMap<>();
        for (ObjectivePlanningExtendDto oneObj : reqDto.getObjectivePlanningExtendList()) {
            indexInfo.put(oneObj.getObjectiveId(), oneObj);
        }
        for (String oneTarget : reqDto.getTargetObjList()) {

            if (!indexInfo.containsKey(oneTarget)) {
                filteredList.add(oneTarget);
            }
        }
        retData.setTargetObjList(filteredList);
        return retData;
    }

    /**
     * code:receptionService
     * name:M3-传输数值0
     * desc:undefined
     * gen by moon at 9/19/2022, 6:55:09 PM
     **/
    @Trace(operationName = "M3-传输数值0")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ObtainReceiveOutFieldRespDto obtainReceiveOutField(ObtainReceiveOutFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ObtainReceiveOutFieldRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3执行业务应用构造出入参字段（特殊方法）
     * desc:undefined
     * gen by moon at 9/23/2022, 3:06:43 AM
     **/
    @Trace(operationName = "M3执行业务应用构造出入参字段（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementBizConstructAccessParameterFieldRespDto implementBizConstructAccessParameterField(ImplementBizConstructAccessParameterFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementBizConstructAccessParameterFieldRespDto.class);
    }

    /**
     * code:dataFilterAssignCode
     * name:M3执行数据集减去N记录（特殊方法）
     * desc:undefined
     * gen by moon at 9/23/2022, 5:23:18 AM
     **/
    @Trace(operationName = "M3执行数据集减去N记录（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementDataSetSubtractNrecordRespDto implementDataSetSubtractNrecord(ImplementDataSetSubtractNrecordReqDto reqDto) {
        ImplementDataSetSubtractNrecordRespDto retData = new ImplementDataSetSubtractNrecordRespDto();
        List<TypeEncodingDto> filteredList = new ArrayList<>();
        String code1 = "";
        String code2 = "";
        String code3 = "";
        String code4 = "";
        if (reqDto.getPuisneDeptEnd() != null) {
            code1 = reqDto.getPuisneDeptEnd();
        }
        if (reqDto.getPuisneDeptStaffEnd() != null) {
            code2 = reqDto.getPuisneDeptStaffEnd();
        }
        if (reqDto.getCustomField() != null) {
            code3 = reqDto.getCustomField();
        }
        if (reqDto.getCustomField1() != null) {
            code4 = reqDto.getCustomField1();
        }
        for (TypeEncodingDto oneCode : reqDto.getTypeEncodingList()) {
            if (!oneCode.getCode().equals(code1)
                    && !oneCode.getCode().equals(code2)
                    && !oneCode.getCode().equals(code3)
                    && !oneCode.getCode().equals(code4)) {
                filteredList.add(oneCode);
            }
        }
        retData.setTypeEncodingList(filteredList);
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-分工内容名称生成分工内容描述
     * desc:undefined
     * gen by moon at 9/24/2022, 10:07:20 PM
     **/
    @Trace(operationName = "M3-分工内容名称生成分工内容描述")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public GenerateSemanticContentRespDto generateSemanticContent(GenerateSemanticContentReqDto reqDto) {
        //当前目标{divisionContName}
        boolean bRetFlag = false;
        GenerateSemanticContentRespDto retData = new GenerateSemanticContentRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CODE_NAME_CREATE_DIVISION_DESC");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String divisionContName = "\\{divisionContName}";
            if (reqDto.getDivisionContName() != null && !reqDto.getDivisionContName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(divisionContName, reqDto.getDivisionContName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(divisionContName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }

        //当前目标由{codeName}牵头直接汇报即可
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto_2 = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto_2.setTemplateSemanticEngineCode("CODE_NAME_CREATE_DIVISION_DESC");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto_2 = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto_2).getData();
        if (querySemanticEngineDetailRespDto_2 != null && querySemanticEngineDetailRespDto_2.getTemplateEngineTemplate() != null) {
            String codeName = "\\{codeName}";
            if (reqDto.getCodeName() != null && !reqDto.getCodeName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto_2.getTemplateEngineTemplate().replaceAll(codeName, reqDto.getDivisionContName());
            } else {
                retConent = querySemanticEngineDetailRespDto_2.getTemplateEngineTemplate().replaceAll(codeName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:getCurrentContentCode
     * name:M3输出当前内容标识（特殊方法）
     * desc:undefined
     * gen by moon at 9/26/2022, 9:57:41 PM
     **/
    @Trace(operationName = "M3输出当前内容标识（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ObtainObjectCodeRespDto obtainObjectCode(ObtainObjectCodeReqDto reqDto) {
        ObtainObjectCodeRespDto retData = new ObtainObjectCodeRespDto();
        if (reqDto.getPeerContentCodeList() == null || reqDto.getPeerContentCodeList().size() == 0) {
            if (reqDto.getSuperiorContentCode().equals("1")) {
                retData.setCurrentContentCode(reqDto.getSuperiorContentCode() + "001");
            } else {
                retData.setCurrentContentCode(reqDto.getSuperiorContentCode() + "1001");
            }

        } else if (reqDto.getPeerContentCodeList().size() > 0) {
            String first = reqDto.getPeerContentCodeList().get(0);
            String preFix = first.substring(0, first.length() - 4);
            List<String> shortCodeList = reqDto.getPeerContentCodeList().stream().map(code -> code.substring(code.length() - 4)).collect(Collectors.toList());
            List<Long> codeNumList = shortCodeList.stream().map(code -> Long.valueOf(code)).collect(Collectors.toList());
            Long max = Collections.max(codeNumList) + 1;
            retData.setCurrentContentCode(preFix + String.valueOf(max));
        }
        return retData;
    }

    /**
     * code:rowToColumn
     * name:M3执行目标内容ID行转列(特殊方法）
     * desc:undefined
     * gen by moon at 9/27/2022, 8:47:27 AM
     **/
    @Trace(operationName = "M3执行目标内容ID行转列(特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementTargetContIdRowToColumnRespDto implementTargetContIdRowToColumn(ImplementTargetContIdRowToColumnReqDto reqDto) {
        // TODO ruizhe skai dong ; 9/27/2022, 8:47:27 AM
        return new ImplementTargetContIdRowToColumnRespDto();
    }

    /**
     * code:ATUO_INHERIT_NUM_VALUE
     * name:M3-传值加一(特殊方法）
     * desc:undefined
     * gen by moon at 10/3/2022, 7:52:26 PM
     **/
    @Trace(operationName = "M3-传值加一(特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public GenerateValueTransferPlusOneRespDto generateValueTransferPlusOne(GenerateValueTransferPlusOneReqDto reqDto) {
        return BeanUtil.toBean(reqDto, GenerateValueTransferPlusOneRespDto.class);
    }

    /**
     * code:generateSemanticInstance
     * name:M3-分工内容名称生成分工内容描述
     * desc:undefined
     * gen by moon at 10/19/2022, 6:24:21 AM
     **/
    @Trace(operationName = "M3-分工内容名称生成分工内容描述")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public DivisionContNameCreateDivisionDescRespDto divisionContNameCreateDivisionDesc(DivisionContNameCreateDivisionDescReqDto reqDto) {
        //当前目标{divisionContName}
        boolean bRetFlag = false;
        DivisionContNameCreateDivisionDescRespDto retData = new DivisionContNameCreateDivisionDescRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CODE_NAME_CREATE_DIVISION_DESC");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String divisionContName = "\\{divisionContName}";
            if (reqDto.getDivisionContName() != null && !reqDto.getDivisionContName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(divisionContName, reqDto.getDivisionContName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(divisionContName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-编码名称生成分工内容描述
     * desc:undefined
     * gen by moon at 10/19/2022, 6:24:27 AM
     **/
    @Trace(operationName = "M3-编码名称生成分工内容描述")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CodeNameCreateDivisionDescRespDto codeNameCreateDivisionDesc(CodeNameCreateDivisionDescReqDto reqDto) {
        //当前目标由{codeName}牵头直接汇报即可
        boolean bRetFlag = false;
        CodeNameCreateDivisionDescRespDto retData = new CodeNameCreateDivisionDescRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("DIVISION_CONT_NAME_CREATE_DIVISION_DESC");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String codeName = "\\{codeName}";
            if (reqDto.getCodeName() != null && !reqDto.getCodeName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(codeName, reqDto.getCodeName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(codeName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:receptionService
     * name:M3数量型无实际值标记为“是”
     * desc:undefined
     * gen by moon at 1/26/2023, 12:43:30 PM
     **/
    @Trace(operationName = "M3数量型无实际值标记为“是”")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementAccessParameterBizFieldRespDto implementAccessParameterBizField(ImplementAccessParameterBizFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementAccessParameterBizFieldRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3接收层级字段
     * desc:undefined
     * gen by moon at 5/4/2023, 12:52:02 PM
     **/
    @Trace(operationName = "M3接收层级字段")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementAcceptFieldRespDto implementAcceptField(ImplementAcceptFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementAcceptFieldRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3接收上文出参字段值
     * desc:undefined
     * gen by moon at 10/31/2023, 5:29:08 PM
     **/
    @Trace(operationName = "M3接收上文出参字段值")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementGainInParameterFieldsRespDto implementGainInParameterFields(ImplementGainInParameterFieldsReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementGainInParameterFieldsRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3-约定目标内容业务层级字段（特殊方法）
     * desc:undefined
     * gen by moon at 2/5/2024, 9:09:43 PM
     **/
    @Trace(operationName = "M3-约定目标内容业务层级字段（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementFiveReceivingFieldRespDto implementFiveReceivingField(ImplementFiveReceivingFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementFiveReceivingFieldRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3约定系统对接
     * desc:undefined
     * gen by moon at 3/15/2024, 3:47:20 AM
     **/
    @Trace(operationName = "M3约定系统对接")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementFourthReceivingFieldRespDto implementFourthReceivingField(ImplementFourthReceivingFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementFourthReceivingFieldRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3约定：是与否与混合
     * desc:undefined
     * gen by moon at 5/19/2024, 9:23:04 PM
     **/
    @Trace(operationName = "M3约定：是与否与混合")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementElevenReceivingFieldRespDto implementElevenReceivingField(ImplementElevenReceivingFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementElevenReceivingFieldRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3-约定字段：是
     * desc:undefined
     * gen by moon at 9/7/2024, 1:29:00 PM
     **/
    @Trace(operationName = "M3-约定字段：是")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementEightReceivingFieldRespDto implementEightReceivingField(ImplementEightReceivingFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementEightReceivingFieldRespDto.class);
    }
    //手工接入方法
}
